package com.itheima.controller;

import com.itheima.domain.mongo.RecommendUser;
import com.itheima.service.mongo.RecommendUserService;
import com.itheima.vo.PageBeanVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/recommendUser")
public class RecommendUserController{

    @Autowired
    private RecommendUserService recommendUserService;

    @GetMapping("/findMaxScore")
    public RecommendUser findMaxScore(Long userId) {
        return recommendUserService.findMaxScore(userId);
    }

    @GetMapping("/findRecommend")
    public PageBeanVo findRecommendUser(Long userId, Integer pageNum, Integer pageSize) {
        return recommendUserService.findRecommendUser(userId,pageNum, pageSize);
    }

    @GetMapping("/findRecommendUser")
    public RecommendUser findRecommendUser(Long userId, Long recommendUserId) {
        return recommendUserService.findRecommendUser(userId,recommendUserId);
    }
}
